1单选下列不属于线性结构的是:Whichoneofthefollowingsdoesnotbelon
1单选下列不属于线性结构的是:Whichoneofthefollowingsdoesnotbelongtolinearstructure:(Thereisonlyonecorrectanswer)

A.队列(queue)

B.图(graph)

C.向量(vector)

D.散列表(hashtable)

2单选以下哪种结构是逻辑结构,而与存储和运算无关:Whichofthefollowingstructureisalogicalstructureregardlessofthestorageoralgorithm:(Thereisonlyonecorrectanswer)

A.顺序表(Sequentiallist)

B.数组(array)

C.双链表(doublylinkedlist)

D.队列(queue)

3多选关于算法特性描述正确的有:Whichoneisrightaboutalgorithm’scharacterization:(therearemorethanonecorrectanswers)

A.组成算法的指令可以有限也可能无限。Instructionswhichcompositealgorithmscanbeinfiniteorfinite

B.算法的有穷性指算法必须在有限步骤内结束。Thefinitenatureofalgorithmsmeansalgorithmmustbecompletedwithinalimitedstep.

C.算法保证计算结果的正确性。Algorithmwillensurethecorrectnessofthecalculationresults.

D.算法描述中下一步执行的步骤不确定。Thenextstepintheimplementationofthealgorithmdescribedisuncertain.

4多选下列说法正确的是:Whichoptionsmaybecorrect?(therearemorethanonecorrectanswers)

A.函数f(n)是O(g(n)),当常数a足够大时,一定有函数g(n)是O(af(n))【iff(n)是O(g(n)),Whenconstantaisbigenough,theremustbeg(n)isO(af(n))】

B.如果函数f(n)是O(g(n)),g(n)是O(h(n)),那么f(n)是O(h(n))【iff(n)isO(g(n)),g(n)isO(h(n)),thenf(n)isO(h(n))】

C.如果函数f(n)是O(g(n)),g(n)是O(h(n)),那么f(n)+g(n)是O(h(n))【iff(n)isO(g(n)),g(n)isO(h(n)),sof(n)+g(n)isO(h(n))】

D.如果a>b>1,,但不一定是【ifa>b>1,ismaynotbe

5多选已知一个数组a的长度为n,求问下面这段代码的时间复杂度:Anarrayofa,itslengthisknownasn.Pleaseanswerthetimecomplexityofthefollowingcode.(Therearemorethanoneanswers.)for(i=0,length=1;i<n-1;i++){for(j=i+1;j<n&&a[j-1]<=a[j];j++)if(length<j-i+1)length=j-i+1;}

A.

B.

C.

D.

数据结构与算法

北京大学

军职在线答案

大学网课

«
»

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注